package com.nothingboard.module.site.dao.impl;

import javax.annotation.Resource;

import org.springframework.dao.DataAccessException;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;

import com.ibatis.sqlmap.client.SqlMapClient;
import com.nothingboard.module.site.dao.SiteConfigDao;

@Repository("siteConfigDao")
public class SiteConfigDaoImpl extends SqlMapClientDaoSupport implements SiteConfigDao {
	
	@Resource(name="sqlMapClient") 
    public void setSuperSqlMapClient(SqlMapClient client){ 
        super.setSqlMapClient(client); 
    }
	
	@Override
	public Object getSiteConfig(String domain) throws DataAccessException {
		return getSqlMapClientTemplate().queryForObject("site.getSiteConfig", domain);
	}

}
